package com.eorchis.module.signupdept.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.eorchis.core.basedao.condition.BaseTreeCondition;
import com.eorchis.core.basedao.dao.IDaoSupport;
import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.service.impl.AbstractBaseService;
import com.eorchis.module.department.domain.DepartmentTreeCondition;
import com.eorchis.module.signupdept.dao.ISignupDeptDao;
import com.eorchis.module.signupdept.domain.SignupDept;
import com.eorchis.module.signupdept.service.ISignupDeptService;
import com.eorchis.module.signupdept.ui.commond.SignupDeptValidCommond;

/**
 * Title: SignupDeptServiceImpl<br>
 * Description: 报名单位管理业务接口实现<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Max
 * @createDate 2014-12-29
 * @version $Revision$
 */
// 声明本类为Server实现类，声明bean名称
@Service(value = "com.eorchis.module.signupdept.service.impl.SignupDeptServiceImpl")
public class SignupDeptServiceImpl 
			extends AbstractBaseService
		implements ISignupDeptService {
		
	@Autowired
	@Qualifier("com.eorchis.module.signupdept.dao.impl.SignupDeptDaoImpl")
	private ISignupDeptDao signupDeptDao;

	public IDaoSupport getDaoSupport() {
		return signupDeptDao;
	}
	@SuppressWarnings("unchecked")
	public SignupDeptValidCommond toCommond(IBaseEntity entity) {
		return new SignupDeptValidCommond((SignupDept)entity);
	}
	
	/**
	 * 报名部门树查询
	 * 
	 * @param condition
	 * @return
	 * @author Max
	 * @createDate 2014-12-29
	 */
	protected List<?> findNextNodeList(BaseTreeCondition condition) throws Exception {
		return signupDeptDao.listDepartmentTree((DepartmentTreeCondition) condition);
	}

}
